<?php
namespace Home\Controller;
class BaomingController extends CommonController {
	
	private $m;
	private $termService;
	private $orderService;
	
	function _initialize(){
		parent::_initialize();
		$this->termService = D('YgclTerm','Service');
		$this->orderService = D('YgclOrder','Service');
	}
	
    public function index(){
    	//获得学期信息
    	$stype = I('t');
    	$stype ? $t=$stype:$t='xinsheng';
    	if($t == 'laosheng'){
    		$type = I('type');
			$id = I('id');
    		if($type && $id){
    			$old = R('Api/Student/get_old_student',array('type'=>$type,'id'=>$id));
    			$this->old = $old;
    		}else{
    			$this->redirect('/home/baoming/laosheng');
    		}
    	}
    	$this->t = $t;
    	$this->display();
    }
    
    public function midpay(){
    	$this->display();
    }
    
    public function pay(){
    	$id = I('id');
    	if($id){
    		$this->info = D('YgclOrder')->where(array('id'=>$id))->relation(true)->find();
    	}
    	$this->display();
    }
}